﻿@section header
    {
    <link rel="stylesheet" href="/css/treetable.css" />
    <link rel="stylesheet" href="/js/dtree/dtree.css" />
    <link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
}
<div class="layui-row">
        <blockquote class="layui-elem-quote news_search toolList layui-col-xs6" id="menus">
        </blockquote>
        <div class="demotable toolList layui-col-xs6">
            搜索车辆号：
             <div class="layui-inline">
            <input class="layui-input" name="PlateNumber" id="PlateNumber" autocomplete="off">
           </div>
            搜索经办人：
            <div class="layui-inline">
                <input class="layui-input" name="Operator" id="Operator" autocomplete="off">
            </div>
            <button class="layui-btn" data-type="search">搜索</button>
        </div>
</div>   
    <div class="layui-row">
        <div class="layui-col-xs2">
            <ul id="tree" class="ztree"
            style="padding: 2px; border: 1px solid #ddd; overflow: auto;">
            </ul>
        </div>
        <div class="layui-col-xs10">
            <table class="layui-table"
               lay-data="{height: 'full-80', page:true, id:'mainList'}"
               lay-filter="list" lay-size="sm">
                <thead>
                    <tr>
                        <th lay-data="{ checkbox: true, fixed: true }"></th>
                        <th lay-data="{field:'Operator', width:150}">经办人</th>
                        <th lay-data="{field:'PlateNumber', width:150, }">车牌号</th>
                        <th lay-data="{field:'OilCost', width:150}">加油费用</th>
                        <th lay-data="{field:'FuelQuantity', width:150}">加油量</th>
                        <th lay-data="{field:'Mileage', width:150}">公里数</th>
                        <th lay-data="{field:'PaymentMethod', width:150, templet:'#PaymentMethod'}">支付方式</th>
                        <th lay-data="{field:'Remarks', width:150}">备注</th>
                        <th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
                    </tr>
                </thead>
            </table>
            <script type="text/html" id="PaymentMethod">
                {{# if(d.PaymentMethod==1){ }}
                <span class="layui-badge">支付宝</span>
                {{# } if(d.PaymentMethod==2){}}
                <span class="layui-badge layui-bg-green">微信</span>
                {{# } if(d.PaymentMethod==3){}}
                <span class="layui-badge layui-bg-blue">银行卡</span>
                {{# }if(d.PaymentMethod==4){}}
                <span class="layui-badge layui-bg-gray">其他方式</span>
                {{# }
                }}
            </script>
         
        </div>
    </div>
    <!--油表添加/编辑窗口-->
    <div id="divEdit" style="display: none">
        <form class="layui-form layui-form-pane" action="" id="formEdit">
            <input type="hidden" name="Id" v-model="tmp.Id" />
            <div class="layui-form-item">
                <label class="layui-form-label">经办人</label>
                <div class="layui-input-block">
                    <input type="text" name=" Operator" v-model="tmp. Operator" required lay-verify="required"
                       placeholder="请输入经办人" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">车牌号</label>
                <div class="layui-input-block">
                    <input type="text" name=" PlateNumber" v-model="tmp. PlateNumber" required lay-verify="required"
                       placeholder="请输入车牌号" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">加油费用/元</label>
                <div class="layui-input-block">
                    <input type="text" name=" OilCost" v-model="tmp. OilCost" required lay-verify="required"
                       placeholder="请输入加油费用" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">加油量/L</label>
                <div class="layui-input-block">
                    <input type="text" name=" FuelQuantity" v-model="tmp. FuelQuantity" required lay-verify="required"
                       placeholder="请输入加油量" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">起始公里数</label>
                <div class="layui-input-block">
                    <input type="number" name=" Mileage" v-model="tmp. Mileage" required lay-verify="required"
                       placeholder="请输入起始公里数" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">支付方式</label>
                <div class="layui-input-block">
                    <select name=" PaymentMethod" v-model="tmp. PaymentMethod" required lay-verify="required"
                        placeholder="请输入支付方式" autocomplete="off" class="layui-select">
                        <option value="1">支付宝</option>
                        <option value="2">微信</option>
                        <option value="3">银行卡</option>
                        <option value="4">其他方式</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <textarea name="Remarks" placeholder="请输入内容" v-model="tmp. Remarks" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

    <script type="text/javascript" src="/layui/layui.js"></script>
    <script type="text/javascript" src="/userJs/oilCosts.js?v=1"></script>